// UsesProcTable.h : stores the variables used in each procedure.
// Author: Achyut P Balaji
//

#ifndef USES_PROC_TABLE_H
#define USES_PROC_TABLE_H
#include"SPA_Data_Types.h"

using namespace std;

typedef vector<VAR_INDEX> VAR_LIST;

class UsesProcTable {
private:
	vector<VAR_LIST> variablesUsed;
	vector<VAR_LIST> tempVarUsed;
	static UsesProcTable *obj;
	UsesProcTable();
	bool initialised;
public:
	static UsesProcTable* getInstance();
	BOOLEAN addEntry(VAR_LIST varUsed);
	BOOLEAN addEntry(PROC_INDEX p,VAR_LIST varUsed);
	BOOLEAN isUsed(PROC_INDEX n, VAR_INDEX ind);
	VAR_LIST getVarUsed(PROC_INDEX n);
	void initialise();
};


#endif